package com.nightpiter.model.objects;

/**
 * @author Eldar Abusalimov (eldar.abusalimov@gmail.com)
 */
public class Coordinates {

	public int x;

	public int y;

	public Coordinates() {
		this.x = 0;
		this.y = 0;
	}

	public Coordinates(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public Coordinates(Coordinates other) {
		this.x = other.x;
		this.y = other.y;
	}

	public String toString() {
		return "(" + x + ";" + y + ")";
	}
	
	@Override
	public boolean equals(Object o) {
		if (o instanceof Coordinates) {
			Coordinates other = (Coordinates) o;
			return (this.x == other.x && this.y == other.y);
		} else {
			return false;
		}
	}

}
